import Vue from 'vue'
import Vuex from 'vuex'
import createPersiste from 'vue-savedata'

Vue.use(Vuex)



// ciphertext: false,

export default new Vuex.Store({
  state: {
    user: {},
    titleName: "",
    navId: "",
    columnId: "",
    articleId: "",
    isadd: true
  },
  mutations: {
    setUserData(state, obj) {
      state.user = obj
    },
    setTitleName(state, name) {
      state.titleName = name
    },
    setNavId(state, value) {
      state.navId = value
    },
    columnId(state, value) {
      state.columnId = value
    },
    setArticleId(state, value) {
      state.articleId = value
    },
    setIsAdd(state, value) {
      state.isadd = value
    },



  },
  plugins: [createPersiste()]
})